<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Ramda</title>
</head>
<body>
    <script src="../ramda.min.js"></script>
    <script>
        var byAge = R.ascend(R.prop('age'));
        var people = [
            { name: 'fsh', age: 32 },
            { name: 'zh', age: 29 },
            { name: 'zcs', age: 24 }
        ];
        console.log( R.sort(byAge, people) );
        // [{"name":"zcs","age":24},{"name":"zh","age":29},{"name":"fsh","age":32}]
    </script>
</body>
</html>